package com.wnzt.baszh.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.wnzt.baszh.dao.IArchivingDao;
import com.wnzt.baszh.dao.IUtilDao;
import com.wnzt.baszh.service.IArchivingService;
import com.wnzt.baszh.util.common.PageHelper;
/**
 * 归档业务层实现类
 * @author dqw
 *
 */
@Repository
public class ArchivingServiceImpl implements IArchivingService{

	@Autowired
	private IArchivingDao archivingDao;
	
	@Autowired
	private IUtilDao utilDao;

	@Override
	public List<Map<String, Object>> getFcybs(String ksbh, String fcode) throws Exception {
		List<Map<String,Object>> list = archivingDao.getFcybsByKsbh(ksbh,fcode);
		return list;
	}

	@Override
	public PageHelper queryArchiving(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.queryArchiving(map);
		return page;
	}

	@Override
	public List<List<Map<String, Object>>>  getArchivingByFzyid(String fzyids) throws Exception {
		List<List<Map<String, Object>>>  list = archivingDao.getArchivingByFzyid(fzyids);
		return list;
	}

	@Override
	public List<Map<String, Object>> getDeptByFcode(String fcode) throws Exception {
		List<Map<String, Object>> resultList = archivingDao.getDeptByFcode(fcode);
		return resultList;
	}

	@Override
	public List<Map<String, Object>> getBQByFcode(String fcode) throws Exception {
		List<Map<String, Object>> resultList = archivingDao.getBQByFcode(fcode);
		return resultList;
	}

	@Override
	public PageHelper queryAllArchiving(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.queryAllArchiving(map);
		return page;
	}

	@Override
	public List<Map<String, Object>> getAllFcybs(String ksbh) throws Exception {
		List<Map<String, Object>> list = archivingDao.getAllFcybs(ksbh);
		return list;
	}

	@Override
	public PageHelper queryStatistics(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.queryStatistics(map);
		return page;
	}

	@Override
	public PageHelper getYqgdData(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.getYqgdData(map);
		return page;
	}

	@Override
	public PageHelper queryBrowseHistory(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.queryBrowseHistory(map);
		return page;
	}

	@Override
	public Map<String, Object> getToday() throws Exception {
		Map<String, Object> result = archivingDao.getToday();
		return result;
	}

	@Override
	public Map<String, Object> getThisWeek() throws Exception {
		 Map<String, Object> result = archivingDao.getThisWeek();
		return result;
	}

	@Override
	public Map<String, Object> getLastWeek() throws Exception {
		Map<String, Object> result = archivingDao.getLastWeek();
		return result;
	}

	@Override
	public List<Map<String, Object>> getAllYear() throws Exception {
		List<Map<String, Object>> list = archivingDao.getAllYear();
		return list;
	}

	@Override
	public List<Map<String, Object>> getAllBrowseName() throws Exception {
		List<Map<String, Object>> list = archivingDao.getAllBrowseName();
		return list;
	}

	@Override
	public PageHelper queryBrowseLog(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.queryBrowseLog(map);
		return page;
	}

	@Override
	public PageHelper getApplyRecord(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.getApplyRecord(map);
		return page;
	}

	@Override
	public List<Map<String, Object>> getApplyDetails(String fzyid) throws Exception {
		List<Map<String, Object>> list = archivingDao.getApplyDetails(fzyid);
		return list;
	}

	@Override
	public PageHelper getBatchApplyRecord(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.getBatchApplyRecord(map);
		return page;
	}

	@Override
	public List<Map<String, Object>> getBatchApplyDetails(String fsqid) throws Exception {
		List<Map<String, Object>> list = archivingDao.getBatchApplyDetails(fsqid);
		return list;
	}

	@Override
	public PageHelper getBatchList(Map<String, Object> map) throws Exception {
		PageHelper page = archivingDao.getBatchList(map);
		return page;
	}
	
	@Override
	public List<Map<String, Object>> getNotArchived()throws Exception {
		return archivingDao.getNotArchived();
	}

	@Override
	public void updateArchivedStatus(String fid) throws Exception {
		archivingDao.updateArchivedStatus(fid);
		
	}

	@Override
	public void addArchived(String fzyid, String fprn, String ftimes,
			String fname) throws Exception {
		archivingDao.addArchived(fzyid, fprn, ftimes, fname);
		
	}

	@Override
	public void addArchived(String fprn, String ftimes,String status) throws Exception {
		archivingDao.addArchived(fprn, ftimes, status);
	}

	@Override
	public void addBagdmx(String fprn, String ftimes, String fblmc,
			String fbllx, String fpages, String ftemppath) throws Exception {
		archivingDao.addBagdmx(fprn, ftimes, fblmc, fbllx, fpages, ftemppath);
		
	}

	@Override
	public void updateBagdmx(String fprn, String ftimes, String fblmc,
			String encryptpath, String signpath) throws Exception {
		archivingDao.updateBagdmx(fprn, ftimes, fblmc, encryptpath, signpath);
		
	}

	@Override
	public void saveArchived(Map<String, Object> param) throws Exception {
		archivingDao.saveArchived(param);
		
	}
}
